import {INCREMENT,DECREMENT} from './constant'
import store from './store'
export const createIncrementAction = data => ({type:INCREMENT,data})
export const createDecrementAction = (data) => {
    return {
        type: DECREMENT,data
}
}
// 异步action，就是action的值为函数
export const createIncrementAsyncAction = (data,time) => {
    return ()=> {
         
        setTimeout(()=>{
            store.dispatch(createIncrementAction(data))
        },time)

    }
}


